package com.shh.shojbackendjudgeservice.judge.codesandbox.impl;



import com.shh.shojbackendjudgeservice.judge.JavaCodeSandboxTemplate;
import com.shh.shojbackendjudgeservice.judge.JavaNativeCodeSandbox;
import com.shh.shojbackendjudgeservice.judge.codesandbox.CodeSandbox;
import com.shh.shojbackendmodel.model.codesandbox.ExecuteCodeRequest;
import com.shh.shojbackendmodel.model.codesandbox.ExecuteCodeResponse;
import org.springframework.stereotype.Service;

/**
 * 示例代码沙箱
 */
@Service
public class ExampleCodeSandbox implements CodeSandbox {

    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        JavaCodeSandboxTemplate javaCodeSandboxTemplate = new JavaCodeSandboxTemplate();
        ExecuteCodeResponse executeCodeResponse = javaCodeSandboxTemplate.executeCode(executeCodeRequest);
        System.out.println(executeCodeResponse);
        return executeCodeResponse;
    }
}


